Skip to content

Comments

fix: add root tsconfig.json for extensions DX and consolidate ExtensionViewProps#1955

Merged
yujonglee merged 1 commit intomainfrom
devin/1764250501-fix-extensions-tsconfig
Nov 28, 2025
Merged

fix: add root tsconfig.json for extensions DX and consolidate ExtensionViewProps#1955
yujonglee merged 1 commit intomainfrom
devin/1764250501-fix-extensions-tsconfig

Conversation

@yujonglee
Copy link
Contributor

@yujonglee yujonglee commented Nov 27, 2025

Summary

Fixes TypeScript IDE errors in the extensions/ folder by adding a root tsconfig.json with project references. This helps VSCode recognize extensions/tsconfig.json as the correct config for files in that folder.

Also consolidates the ExtensionViewProps type into @hypr/plugin-extensions package and removes the redundant local type definition from the desktop app.

Changes:

  • Add root tsconfig.json with project references to apps/desktop, extensions, and packages/ui
  • Move ExtensionViewProps interface to plugins/extensions/js/index.ts
  • Update registry.ts to import from @hypr/plugin-extensions
  • Remove redundant apps/desktop/src/types/extensions.d.ts

Review & Testing Checklist for Human

  • Verify the DX fix works: Open extensions/hello-world/ui.tsx in VSCode and confirm the react/jsx-runtime error is gone. Run TypeScript: Go to Project Configuration command to verify it points to extensions/tsconfig.json
  • Test desktop app builds: Run pnpm -F desktop tauri dev to ensure the app still works after the import change
  • Consider extension authoring: Note that extensions themselves can't import ExtensionViewProps from @hypr/plugin-extensions since that package has Tauri dependencies - extension authors will still define this interface locally

Notes

  • The root tsconfig uses "files": [] to prevent it from becoming a catch-all project
  • This is a minimal fix focused on IDE DX; no runtime behavior changes

Link to Devin run: https://app.devin.ai/sessions/aeff7a7a730f458bbe86029a3b44b75d
Requested by: yujonglee (@yujonglee)

…onViewProps

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@netlify
Copy link

netlify bot commented Nov 27, 2025

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit 527b694
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/6928547da6e81500086ca078
😎 Deploy Preview https://deploy-preview-1955--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Nov 27, 2025

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit 527b694
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/6928547daf62b000088219ff
😎 Deploy Preview https://deploy-preview-1955--hyprnote-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 27, 2025

📝 Walkthrough

Walkthrough

Consolidates the ExtensionViewProps type definition by moving it from the desktop application's local types to the plugin extensions package's public API. The registry component updates its import source accordingly, with no runtime behavior changes.

Changes

Cohort / File(s) Summary
Type Definition Consolidation
plugins/extensions/js/index.ts
Adds exported ExtensionViewProps interface with extensionId: string and optional state properties
Type Removal
apps/desktop/src/types/extensions.d.ts
Removes local ExtensionViewProps interface definition and unused React import
Import Source Update
apps/desktop/src/components/main/body/extensions/registry.ts
Updates ExtensionViewProps import to reference @hypr/plugin-extensions instead of local types
Configuration
tsconfig.json
Adds new TypeScript project references configuration for ./apps/desktop, ./extensions, and ./packages/ui

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Straightforward type consolidation with no behavioral changes
  • Import path updates are mechanical and verifiable
  • Configuration file addition is standard TypeScript setup

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the two main changes: adding a root tsconfig.json for extensions IDE experience and consolidating ExtensionViewProps type definitions.
Description check ✅ Passed The description is directly related to the changeset, providing clear context about TypeScript IDE errors, the tsconfig fix, and ExtensionViewProps consolidation across files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch devin/1764250501-fix-extensions-tsconfig

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
plugins/extensions/js/index.ts (1)

3-6: Shared ExtensionViewProps export looks correct

Centralizing this interface in the plugin package makes the extension surface clearer and avoids drift with desktop types. The shape is minimal and appropriate for a shared boundary; Record<string, unknown> is a good choice here.

If you later need stronger typing for per-extension state, you could consider a generic (e.g., ExtensionViewProps<TState = Record<string, unknown>>), but that’s strictly optional for now.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 02d5673 and 527b694.

📒 Files selected for processing (4)
  • apps/desktop/src/components/main/body/extensions/registry.ts (1 hunks)
  • apps/desktop/src/types/extensions.d.ts (0 hunks)
  • plugins/extensions/js/index.ts (1 hunks)
  • tsconfig.json (1 hunks)
💤 Files with no reviewable changes (1)
  • apps/desktop/src/types/extensions.d.ts
🧰 Additional context used
📓 Path-based instructions (2)
**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.ts: Agent implementations should use TypeScript and follow the established architectural patterns defined in the agent framework
Agent communication should use defined message protocols and interfaces

Files:

  • apps/desktop/src/components/main/body/extensions/registry.ts
  • plugins/extensions/js/index.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Avoid creating a bunch of types/interfaces if they are not shared. Especially for function props, just inline them instead.
Never do manual state management for form/mutation. Use useForm (from tanstack-form) and useQuery/useMutation (from tanstack-query) instead for 99% of cases. Avoid patterns like setError.
If there are many classNames with conditional logic, use cn (import from @hypr/utils). It is similar to clsx. Always pass an array and split by logical grouping.
Use motion/react instead of framer-motion.

Files:

  • apps/desktop/src/components/main/body/extensions/registry.ts
  • plugins/extensions/js/index.ts
🧠 Learnings (1)
📚 Learning: 2025-11-24T16:32:24.348Z
Learnt from: CR
Repo: fastrepl/hyprnote PR: 0
File: apps/desktop-e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T16:32:24.348Z
Learning: Applies to apps/desktop-e2e/**/*.{test,spec}.{js,ts,tsx} : Refer to `scripts/setup-desktop-e2e.sh` for end-to-end test environment setup if setup is missing

Applied to files:

  • tsconfig.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: Redirect rules - hyprnote
  • GitHub Check: Header rules - hyprnote
  • GitHub Check: Pages changed - hyprnote
  • GitHub Check: ci (macos, depot-macos-14)
  • GitHub Check: fmt
  • GitHub Check: ci (linux, depot-ubuntu-24.04-8)
  • GitHub Check: ci (linux, depot-ubuntu-22.04-8)
🔇 Additional comments (1)
apps/desktop/src/components/main/body/extensions/registry.ts (1)

4-9: Importing ExtensionViewProps from plugin package is a clean consolidation

Switching the source of ExtensionViewProps to @hypr/plugin-extensions keeps host and extensions in sync and removes the local duplicate type. The type-only import is also idiomatic and keeps the runtime bundle clean.

No further changes needed here.

@yujonglee yujonglee merged commit ad61840 into main Nov 28, 2025
21 checks passed
@yujonglee yujonglee deleted the devin/1764250501-fix-extensions-tsconfig branch November 28, 2025 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant